﻿package ygg.exporter.swf
{
	import j.sus2maj7.exporter.*;
	import j.sus2maj7.context.*;
	
	import flash.filesystem.*;
	import flash.utils.*;
	
	public class TagExporter extends AbstractExporter
	{
		override public function export(o:*, context:IContext = null):void
		{
			
		}
		
		protected function writeBytesToFile( ba:ByteArray, f:File):void
		{
			//var f:File = context.vars.rootDir.resolvePath('bin/binary_'+ o.tagId.toString() +'.bin');
			var fs:FileStream = new FileStream();
			fs.open(f, FileMode.WRITE);
			fs.writeBytes(ba );
			fs.close();
		}
		protected function writeStringToFile( s:String, f:File):void
		{
			//var f:File = context.vars.rootDir.resolvePath('bin/binary_'+ o.tagId.toString() +'.bin');
			var fs:FileStream = new FileStream();
			fs.open(f, FileMode.WRITE);
			fs.writeUTFBytes( s );
			fs.close();
		}
	}
	
}